1. Field of the Invention
The present invention relates to an image processing apparatus for quantizing an image, an image processing method, and a medium storing an image processing program.
2. Description of the Related Art
In recent years, along with the advance of digitization of information, systems, which scan paper documents using a scanner or the like to convert them into digital document images and to save the digital document images in place of saving these paper documents intact, and transmit such digital document image data to other apparatuses, have prevailed. In such system, in order to reduce transmission cost at the time of transmission, high compressibility is often required for digital documents. Also, reusability that allows to partially edit digital data, and a high image quality property that can assure high image quality even after enlargement or reduction are required. However, when a document image includes both a text region and photo region, if compression suited to a text region is applied, high image quality is assured but the compression ratio becomes low. On the other hand, if compression suited to a photo region is applied, a high compression ratio is assured but characters deteriorate. Hence, it is difficult to meet both high image quality and high compressibility at the same time.
However, in recent years, various techniques have been developed. Japanese Patent Laid-Open No. 2004-265384 describes a technique, which separates a digital document image into a text region and photo region, converts the text region for which the reusability and high image quality property are to be emphasized into vector data, compresses the photo region or the like which cannot be easily reproduced by vector conversion, and composites and outputs the compression results of the respective regions. Also, Japanese Patent Laid-Open No. 2006-344069 describes a technique, which can convert, into vector data, a specific image (illustration) which is included in an image that is compressed so far as a photo, and has features (e.g., such specific image is clear like the contour of an object, and has a limited number of colors). In recent years, with these techniques, high compressibility, high image quality property, and reusability of document images are considered.
In such situation, a vector conversion processing target is not limited to the aforementioned scan image of the paper document. For example, Japanese Patent Laid-Open No. 2006-162692 discloses the following technique. With this technique, an image of a blackboard, whiteboard, or the like is captured by a plurality of cameras, captured images are input to a server, and the color tone characteristics of the plurality of cameras are adjusted so as to attain seamless panoramic composition. Images after color tone correction are panoramically composited, and vector data of writing on the blackboard or whiteboard is generated from the panoramically composited image. Then, the vector data is converted into time-serial Web contents, which are easy to view, and the Web contents are saved.
Characters and figure parts written on the whiteboard have the aforementioned features of the specific image (illustration), i.e., they basically have a limited number of colors, and contours, as described above. Therefore, in an image obtained by capturing an image of the whiteboard or the like using a digital camera, regions are separated for respective colors based on color features, and the contour lines of the respective color regions are converted into vector data, thus realizing the aforementioned high compressibility, high image quality property, and reusability.
On the other hand, an image captured using a digital camera has a feature of readily causing illumination nonuniformity due to the influences of flashlight and illumination conditions unlike an image obtained by scanning a paper document using a scanner.
Therefore, with the conventional vector conversion method, illustration and background parts having similar colors are extracted as one region under the influence of illumination nonuniformity, and an illustration cannot be neatly extracted. Especially, when an input image is a gray image, since there are many illustration parts and background parts having similar density values, an illustration and background cannot be separated.
To solve this problem, vector conversion processing may be executed after an image undergoes lightness correction processing first. However, the lightness correction processing merely removes illumination nonuniformity to some extent, and the aforementioned problem is consequently posed as a result of the vector conversion processing.